package com.ruoyi.stock2.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.stock2.mapper.ForetellResultMapper;
import com.ruoyi.stock2.domain.ForetellResult;
import com.ruoyi.stock2.service.IForetellResultService;
import com.ruoyi.common.core.text.Convert;

/**
 * 交易预测Service业务层处理
 *
 * @author ruoyi
 * @date 2020-04-08
 */
@Service
public class ForetellResultServiceImpl implements IForetellResultService
{
    @Autowired
    private ForetellResultMapper foretellResultMapper;

    /**
     * 查询交易预测
     *
     * @param id 交易预测ID
     * @return 交易预测
     */
    @Override
    public ForetellResult selectForetellResultById(Long id)
    {
        return foretellResultMapper.selectForetellResultById(id);
    }

    /**
     * 查询交易预测列表
     *
     * @param foretellResult 交易预测
     * @return 交易预测
     */
    @Override
    public List<ForetellResult> selectForetellResultList(ForetellResult foretellResult)
    {
        return foretellResultMapper.selectForetellResultList(foretellResult);
    }

    @Override
    public List<ForetellResult> selectForetellResult(ForetellResult foretellResult) {
        return foretellResultMapper.selectForetellResult(foretellResult);
    }

    /**
     * 新增交易预测
     *
     * @param foretellResult 交易预测
     * @return 结果
     */
    @Override
    public int insertForetellResult(ForetellResult foretellResult)
    {
        return foretellResultMapper.insertForetellResult(foretellResult);
    }

    /**
     * 修改交易预测
     *
     * @param foretellResult 交易预测
     * @return 结果
     */
    @Override
    public int updateForetellResult(ForetellResult foretellResult)
    {
        return foretellResultMapper.updateForetellResult(foretellResult);
    }

    /**
     * 删除交易预测对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteForetellResultByIds(String ids)
    {
        return foretellResultMapper.deleteForetellResultByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除交易预测信息
     *
     * @param id 交易预测ID
     * @return 结果
     */
    @Override
    public int deleteForetellResultById(Long id)
    {
        return foretellResultMapper.deleteForetellResultById(id);
    }
}
